/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.util.ObjectUtil
 *  com.alibaba.fastjson.JSON
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.collections.FXCollections
 *  javafx.collections.ObservableList
 *  javafx.event.EventHandler
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.Node
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.Button
 *  javafx.scene.control.CheckBox
 *  javafx.scene.control.ComboBox
 *  javafx.scene.control.TableCell
 *  javafx.scene.control.TableColumn
 *  javafx.scene.control.TableView
 *  javafx.scene.control.TextField
 *  javafx.scene.control.cell.PropertyValueFactory
 *  javafx.scene.input.KeyCode
 *  javafx.scene.input.KeyEvent
 *  javafx.scene.layout.AnchorPane
 *  javafx.scene.text.Text
 *  javafx.stage.Modality
 *  javafx.stage.Stage
 *  javafx.util.Callback
 *  javafx.util.StringConverter
 *  org.springframework.beans.factory.annotation.Autowired
 */
package com.gys.controller.pay;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.gys.common.business.PayUtil;
import com.gys.common.data.HttpJson;
import com.gys.common.data.KeyValue;
import com.gys.common.util.CacheUtil;
import com.gys.common.util.CommonUtil;
import com.gys.common.util.PrintService;
import com.gys.common.util.SpringUtil;
import com.gys.common.util.ValidationUtil;
import com.gys.controller.BaseController;
import com.gys.controller.pay.CzkController;
import com.gys.controller.pay.DyqController;
import com.gys.controller.pay.DzqController;
import com.gys.controller.pay.ExchangeCashController;
import com.gys.controller.pay.MemberTipController;
import com.gys.controller.pay.ScanPayController;
import com.gys.controller.salesReceipts.RecipelDrugsController;
import com.gys.controller.salesReceipts.RecipelInfoInputController;
import com.gys.controller.salesReceipts.SalesReceiptsMainController;
import com.gys.controller.salesReceipts.TipTopController;
import com.gys.data.deviceCheck.GsdcStatus;
import com.gys.data.example.GetLoginStoreOutData;
import com.gys.data.pay.ExchangeCashOutData;
import com.gys.data.pay.GetDzqInData;
import com.gys.data.pay.GetPayInData;
import com.gys.data.pay.GetPayOutData;
import com.gys.data.pay.GetPayTypeInData;
import com.gys.data.pay.GetPayTypeOutData;
import com.gys.data.salesReceipts.RecipelInfoInputData;
import com.gys.view.pay.CzkView;
import com.gys.view.pay.DyqView;
import com.gys.view.pay.DzqView;
import com.gys.view.pay.ExchangeCashView;
import com.gys.view.pay.IndexView;
import com.gys.view.pay.MemberTipView;
import com.gys.view.pay.PayView;
import de.felixroske.jfxsupport.FXMLController;
import java.math.BigDecimal;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.ResourceBundle;
import java.util.Timer;
import java.util.TimerTask;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.text.Text;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.util.Callback;
import javafx.util.StringConverter;
import org.springframework.beans.factory.annotation.Autowired;

@FXMLController
public class PayController
extends BaseController
implements Initializable {
    @FXML
    private TableView<GetPayTypeOutData> tableView;
    @FXML
    private TableColumn<GetPayTypeOutData, String> index;
    @FXML
    private TableColumn<GetPayTypeOutData, String> gspmId;
    @FXML
    private TableColumn<GetPayTypeOutData, String> gspmName;
    @FXML
    private TableColumn<GetPayTypeOutData, CheckBox> checkBox;
    @FXML
    private TableColumn<GetPayTypeOutData, String> payAmount;
    @FXML
    private ComboBox<KeyValue> payType;
    @FXML
    private TextField sfAmount;
    @FXML
    private TextField ysAmount;
    @FXML
    private TextField dkAmount;
    @FXML
    private TextField ssAmount;
    @FXML
    private TextField dsAmount;
    @FXML
    private Button jfBtn;
    @FXML
    private Button dzqBtn;
    @FXML
    private TextField zlAmount;
    @FXML
    private Text totalText;
    @FXML
    private Button payCommitBtn;
    @FXML
    private AnchorPane anchorPane;
    @Autowired
    private TipTopController tipTopController;
    @Autowired
    private RecipelDrugsController recipelDrugsController;
    @Autowired
    private ExchangeCashController exchangeCashController;
    @Autowired
    private MemberTipController memberTipController;
    @Autowired
    private DyqController dyqController;
    @Autowired
    private CzkController czkController;
    @Autowired
    private DzqController dzqController;
    @Autowired
    private ScanPayController scanPayController;
    @Autowired
    private RecipelInfoInputController recipelInfoInputController;
    @Autowired
    private PrintService printService;
    @Autowired
    private SalesReceiptsMainController salesReceiptsMainController;
    private ObservableList<GetPayTypeOutData> observableTableList = FXCollections.observableArrayList(new ArrayList());
    private ObservableList<KeyValue> payTypeOptions;
    public String cardNo;
    public String jfdkAmount = "0";
    public String jfdkPoint = "0";
    public String dyqCode;
    public String dyqAmount = "0";
    public String dyqReason;
    public String czkNo;
    public String czkAmount = "0";
    public String dzqAmount = "0";
    public String xjAmount = "0";
    public String ylAmount = "0";
    public String wxAmount = "0";
    public String zfbAmount = "0";
    public String ybAmount = "0";
    public List<GetDzqInData> dzqList = new ArrayList<GetDzqInData>();

    public void initialize(URL location, ResourceBundle resources) {
        this.init();
    }

    @Override
    public void init() {
        if (ObjectUtil.isEmpty(this.anchorPane)) {
            return;
        }
        this.payCommitBtn.setDisable(false);
        this.sfAmount.requestFocus();
        this.jfdkAmount = "0";
        this.jfdkPoint = "0";
        this.dyqCode = null;
        this.dyqAmount = "0";
        this.dyqReason = null;
        this.czkNo = null;
        this.czkAmount = "0";
        this.dzqAmount = "0";
        this.xjAmount = "0";
        this.ylAmount = "0";
        this.wxAmount = "0";
        this.zfbAmount = "0";
        this.ybAmount = "0";
        new Timer().schedule(new TimerTask(){

            @Override
            public void run() {
                IndexView view = SpringUtil.getBean(IndexView.class);
                Stage stage = (Stage)view.getView().getScene().getWindow();
                stage.getScene().setOnKeyReleased((EventHandler)new EventHandler<KeyEvent>(){

                    public void handle(KeyEvent event) {
                        if (event.getCode() == KeyCode.ENTER) {
                            if (PayController.this.payType.isFocused()) {
                                PayController.this.sfAmount.requestFocus();
                                return;
                            }
                            PayController.this.sureAction();
                            return;
                        }
                        if (event.getCode() == KeyCode.X) {
                            PayController.this.exchangeCash();
                            return;
                        }
                        if (event.getCode() == KeyCode.J) {
                            PayController.this.dyq();
                            return;
                        }
                        if (event.getCode() == KeyCode.C) {
                            PayController.this.czk();
                            return;
                        }
                        if (event.getCode() == KeyCode.R) {
                            PayController.this.dzq();
                            return;
                        }
                        if (event.getCode() == KeyCode.ESCAPE) {
                            PayController.this.cancelAction();
                            return;
                        }
                        if (event.getCode() == KeyCode.SPACE) {
                            PayController.this.payCommit();
                            return;
                        }
                    }
                });
            }
        }, 1000L);
        GetPayInData inData = new GetPayInData();
        inData.setStoreCode(((GetLoginStoreOutData)CacheUtil.get("store")).getStoCode());
        inData.setType("1");
        HttpJson httpJsonS = PayUtil.payTypeList(inData);
        List<GetPayTypeOutData> items = new ArrayList();
        if (!httpJsonS.isSuccess()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJsonS.getMsg());
            alert.showAndWait();
            return;
        }
        items = JSON.parseArray((String)httpJsonS.getMsg(), GetPayTypeOutData.class);
        ArrayList<KeyValue> payTypeList = new ArrayList<KeyValue>();
        for (GetPayTypeOutData item : items) {
            payTypeList.add(new KeyValue(item.getGspmName(), item.getGspmId()));
        }
        this.payTypeOptions = FXCollections.observableArrayList(payTypeList);
        this.payType.setItems(this.payTypeOptions);
        this.comboxInit(this.payType);
        KeyValue keyValue = new KeyValue();
        keyValue.setValue("1000");
        keyValue.setName("\u73b0\u91d1");
        this.payType.setValue(keyValue);
        this.sfAmount.setText("0.00");
        GetPayInData payInData = new GetPayInData();
        payInData.setBillNo(this.salesReceiptsMainController.getCaseId().getText());
        payInData.setStoreCode(((GetLoginStoreOutData)CacheUtil.get("store")).getStoCode());
        HttpJson httpJson = PayUtil.payInfo(payInData);
        GetPayOutData data = new GetPayOutData();
        if (httpJson.isSuccess()) {
            data = (GetPayOutData)JSON.parseObject((String)httpJson.getMsg(), GetPayOutData.class);
            BigDecimal total = BigDecimal.ZERO;
            this.observableTableList = FXCollections.observableArrayList(data.getPayTypeList());
            for (int i = 0; i < this.observableTableList.size(); ++i) {
                GetPayTypeOutData payTypeOutData = (GetPayTypeOutData)this.observableTableList.get(i);
                total = total.add(payTypeOutData.getPayAmount());
                ((GetPayTypeOutData)this.observableTableList.get(i)).setIndex(i + 1);
                if (((GetPayTypeOutData)this.observableTableList.get(i)).getPayAmount().compareTo(new BigDecimal(0)) > 0) {
                    ((GetPayTypeOutData)this.observableTableList.get(i)).getCheckBox().setSelectStatus(true);
                    continue;
                }
                ((GetPayTypeOutData)this.observableTableList.get(i)).getCheckBox().setSelectStatus(false);
            }
            this.totalText.setText(total.toString());
            this.initTable();
            this.ssAmount.setText(data.getSsAmount().toString());
            this.ysAmount.setText(data.getYsAmount().toString());
            this.dkAmount.setText(data.getDkAmount().toString());
            this.dsAmount.setText(data.getDsAmount().toString());
            this.zlAmount.setText(data.getZlAmount().toString());
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
        }
    }

    public void comboxInit(ComboBox box) {
        box.converterProperty().set(new StringConverter<KeyValue>(){

            public String toString(KeyValue object) {
                return object.getName();
            }

            public KeyValue fromString(String string) {
                return null;
            }
        });
    }

    public TableView<GetPayTypeOutData> initTable() {
        this.bingDetailTableCell();
        this.tableView.setItems(this.observableTableList);
        return this.tableView;
    }

    @FXML
    public void refreshAmount(String payType, String amount) {
        if ("1000".equals(payType)) {
            this.ssAmount.setText(new BigDecimal(this.ssAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.xjAmount)).toString());
        }
        if ("2000".equals(payType)) {
            this.ssAmount.setText(new BigDecimal(this.ssAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.ylAmount)).toString());
        }
        if ("3001".equals(payType)) {
            this.ssAmount.setText(new BigDecimal(this.ssAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.wxAmount)).toString());
        }
        if ("3002".equals(payType)) {
            this.ssAmount.setText(new BigDecimal(this.ssAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.zfbAmount)).toString());
        }
        if ("4000".equals(payType)) {
            this.ssAmount.setText(new BigDecimal(this.ssAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.ybAmount)).toString());
        }
        if ("9003".equals(payType)) {
            this.dkAmount.setText(new BigDecimal(this.dkAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.dyqAmount)).toString());
        }
        if ("9001".equals(payType)) {
            this.dkAmount.setText(new BigDecimal(this.dkAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.jfdkAmount)).toString());
        }
        if ("8000".equals(payType)) {
            this.dkAmount.setText(new BigDecimal(this.dkAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.czkAmount)).toString());
        }
        if ("9002".equals(payType)) {
            this.dkAmount.setText(new BigDecimal(this.dkAmount.getText()).add(new BigDecimal(amount)).subtract(new BigDecimal(this.dzqAmount)).toString());
        }
        BigDecimal total = BigDecimal.ZERO;
        for (GetPayTypeOutData payTypeOutData : this.observableTableList) {
            if (payType.equals(payTypeOutData.getGspmId())) {
                if ("9003".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.dyqAmount)));
                } else if ("9001".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.jfdkAmount)));
                } else if ("8000".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.czkAmount)));
                } else if ("9002".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.dzqAmount)));
                } else if ("1000".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.xjAmount)));
                } else if ("2000".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.ylAmount)));
                } else if ("3001".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.wxAmount)));
                } else if ("3002".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.zfbAmount)));
                } else if ("4000".equals(payType)) {
                    payTypeOutData.setPayAmount(payTypeOutData.getPayAmount().add(new BigDecimal(amount)).subtract(new BigDecimal(this.ybAmount)));
                }
                if (payTypeOutData.getPayAmount().compareTo(BigDecimal.ZERO) > 0) {
                    payTypeOutData.getCheckBox().setSelectStatus(true);
                } else {
                    payTypeOutData.getCheckBox().setSelectStatus(false);
                }
            }
            total = total.add(payTypeOutData.getPayAmount());
        }
        this.totalText.setText(total.toString());
        this.tableView.refresh();
        this.computeAmount();
    }

    @FXML
    private void computeAmount() {
        BigDecimal dsAmounts = new BigDecimal(this.ysAmount.getText()).subtract(new BigDecimal(this.ssAmount.getText())).subtract(new BigDecimal(this.dkAmount.getText()));
        if (dsAmounts.compareTo(BigDecimal.ZERO) < 0) {
            this.zlAmount.setText(Math.abs(dsAmounts.doubleValue()) + "");
            this.dsAmount.setText("0.00");
        } else {
            this.dsAmount.setText(dsAmounts.toString());
            this.zlAmount.setText("0.00");
        }
    }

    @FXML
    public void scanPay(String payCode) {
        GetPayInData payInData = new GetPayInData();
        payInData.setBillNo(this.salesReceiptsMainController.getCaseId().getText());
        payInData.setStoreCode(((GetLoginStoreOutData)CacheUtil.get("store")).getStoCode());
        payInData.setType(((KeyValue)this.payType.getValue()).getValue());
        payInData.setAmount(new BigDecimal(this.sfAmount.getText()));
        payInData.setPayCode(payCode);
        HttpJson httpJson = PayUtil.pay(payInData);
        if (httpJson.isSuccess()) {
            this.refreshAmount(((KeyValue)this.payType.getValue()).getValue(), this.sfAmount.getText());
            this.ylAmount = this.sfAmount.getText();
        } else {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    private void sureAction() {
        if (!((Boolean)CacheUtil.get("networkFlag")).booleanValue()) {
            if (Arrays.asList("2000", "4000").contains(((KeyValue)this.payType.getValue()).getValue())) {
                Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u5f53\u524d\u79bb\u7ebf\uff0c\u8be5\u652f\u4ed8\u65b9\u5f0f\u4e0d\u53ef\u7528");
                alert.showAndWait();
                return;
            }
        }
        if (ObjectUtil.isEmpty(this.sfAmount.getText()) || !ValidationUtil.checkPositiveNumber2F(this.sfAmount.getText())) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u672a\u586b\u5199\u5b8c\u6210\uff0c\u8bf7\u6838\u5bf9\u540e\u7ee7\u7eed\u8f93\u5165\uff01");
            alert.showAndWait();
            return;
        }
        if ("2000".equals(((KeyValue)this.payType.getValue()).getValue()) && new BigDecimal(this.ylAmount).compareTo(BigDecimal.ZERO) > 0) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u5df2\u53d1\u8d77\u8fc7\u652f\u4ed8\uff0c\u4e0d\u8981\u91cd\u590d\u652f\u4ed8\uff01");
            alert.showAndWait();
            return;
        }
        if (new BigDecimal(this.sfAmount.getText()).compareTo(new BigDecimal(this.dsAmount.getText())) > 0 && !"1000".equals(((KeyValue)this.payType.getValue()).getValue())) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u5b9e\u4ed8\u91d1\u989d\u4e0d\u80fd\u5927\u4e8e\u5f85\u6536\u91d1\u989d\uff01");
            alert.showAndWait();
            return;
        }
        if ("2000".equals(((KeyValue)this.payType.getValue()).getValue())) {
            this.scanPayController.init();
            CommonUtil.showView(PayView.class, Modality.APPLICATION_MODAL);
        } else {
            this.refreshAmount(((KeyValue)this.payType.getValue()).getValue(), this.sfAmount.getText());
            if ("1000".equals(((KeyValue)this.payType.getValue()).getValue())) {
                this.xjAmount = this.sfAmount.getText();
            }
            if ("3001".equals(((KeyValue)this.payType.getValue()).getValue())) {
                this.wxAmount = this.sfAmount.getText();
            }
            if ("3002".equals(((KeyValue)this.payType.getValue()).getValue())) {
                this.zfbAmount = this.sfAmount.getText();
            }
            if ("4000".equals(((KeyValue)this.payType.getValue()).getValue())) {
                this.ybAmount = this.sfAmount.getText();
            }
        }
        this.payType.requestFocus();
    }

    @FXML
    private void exchangeCash() {
        if (!((Boolean)CacheUtil.get("networkFlag")).booleanValue()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u5f53\u524d\u79bb\u7ebf\uff0c\u8be5\u529f\u80fd\u4e0d\u53ef\u7528");
            alert.showAndWait();
            return;
        }
        String cardNum = this.salesReceiptsMainController.getCardNum().getText();
        if (ObjectUtil.isEmpty(cardNum)) {
            this.memberTipController.init();
            CommonUtil.showView(MemberTipView.class, Modality.APPLICATION_MODAL);
        } else {
            GetPayInData payInData = new GetPayInData();
            payInData.setStoreCode(((GetLoginStoreOutData)CacheUtil.get("store")).getStoCode());
            payInData.setCardType(this.salesReceiptsMainController.getTypeId());
            HttpJson httpJson = PayUtil.exchangeCash(payInData);
            ExchangeCashOutData data = new ExchangeCashOutData();
            if (httpJson.isSuccess()) {
                this.exchangeCashController.init();
                CommonUtil.showView(ExchangeCashView.class, Modality.APPLICATION_MODAL);
            } else {
                Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
                alert.showAndWait();
                return;
            }
        }
    }

    @FXML
    private void dyq() {
        this.dyqController.init();
        CommonUtil.showView(DyqView.class, Modality.APPLICATION_MODAL);
    }

    @FXML
    private void czk() {
        this.czkController.init();
        CommonUtil.showView(CzkView.class, Modality.APPLICATION_MODAL);
    }

    @FXML
    private void dzq() {
        if (!((Boolean)CacheUtil.get("networkFlag")).booleanValue()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u5f53\u524d\u79bb\u7ebf\uff0c\u8be5\u529f\u80fd\u4e0d\u53ef\u7528");
            alert.showAndWait();
            return;
        }
        String cardNum = this.salesReceiptsMainController.getCardNum().getText();
        if (ObjectUtil.isEmpty(cardNum)) {
            CommonUtil.showView(MemberTipView.class, Modality.APPLICATION_MODAL);
        } else {
            this.dzqController.init();
            CommonUtil.showView(DzqView.class, Modality.APPLICATION_MODAL);
        }
    }

    @FXML
    public void payCommit() {
        try {
            this.payCommitBtn.setDisable(true);
            if (new BigDecimal(this.dsAmount.getText()).compareTo(BigDecimal.ZERO) > 0) {
                Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u6536\u6b3e\u672a\u5b8c\u6210\uff0c\u65e0\u6cd5\u786e\u8ba4\u652f\u4ed8\uff01");
                alert.showAndWait();
                this.payCommitBtn.setDisable(false);
                return;
            }
            GetPayInData payInData = new GetPayInData();
            payInData.setBillNo(this.salesReceiptsMainController.getCaseId().getText());
            payInData.setStoreCode(((GetLoginStoreOutData)CacheUtil.get("store")).getStoCode());
            payInData.setCardNo(this.cardNo);
            payInData.setCzkAmount(new BigDecimal(this.czkAmount));
            payInData.setCzkNo(this.czkNo);
            payInData.setDyqAmount(new BigDecimal(this.dyqAmount));
            payInData.setDyqNo(this.dyqCode);
            payInData.setDyqReason(this.dyqReason);
            payInData.setDzqAmount(new BigDecimal(this.dzqAmount));
            payInData.setDzqList(this.dzqList);
            payInData.setJfdxAmount(new BigDecimal(this.jfdkAmount));
            payInData.setJfdxPoint(this.jfdkPoint);
            payInData.setZlAmount(new BigDecimal(this.zlAmount.getText()));
            payInData.setDkAmount(new BigDecimal(this.dkAmount.getText()));
            ArrayList<GetPayTypeInData> payTypeList = new ArrayList<GetPayTypeInData>();
            for (GetPayTypeOutData payTypeOutData : this.observableTableList) {
                GetPayTypeInData inData = new GetPayTypeInData();
                inData.setGspmId(payTypeOutData.getGspmId());
                inData.setGspmBrId(payTypeOutData.getGspmBrId());
                inData.setGspmFiId(payTypeOutData.getGspmFiId());
                inData.setGspmName(payTypeOutData.getGspmName());
                inData.setGspmRecharge(payTypeOutData.getGspmRecharge());
                inData.setGspmType(payTypeOutData.getGspmType());
                inData.setPayAmount(payTypeOutData.getPayAmount());
                payTypeList.add(inData);
            }
            payInData.setPayTypeList(payTypeList);
            HttpJson httpJson = PayUtil.payCommit(payInData);
            if (httpJson.isSuccess()) {
                this.recipelInfo();
                this.salesReceiptsMainController.countPoint();
                this.printService.printSale(this.salesReceiptsMainController.getCaseId().getText());
                this.salesReceiptsMainController.rest();
                this.payCommitBtn.setDisable(false);
                this.cancelAction();
            } else {
                Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
                alert.showAndWait();
                this.payCommitBtn.setDisable(false);
            }
        }
        catch (Exception ex) {
            this.payCommitBtn.setDisable(false);
            throw ex;
        }
    }

    private void recipelInfo() {
        RecipelInfoInputData recipelInfoInputData = new RecipelInfoInputData();
        recipelInfoInputData.setGssrType("1");
        recipelInfoInputData.setReInput(true);
        this.recipelDrugsController.numZhang = 1;
        HttpJson httpJson = this.recipelInfoInputController.save(recipelInfoInputData);
        if (!httpJson.isSuccess()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
            return;
        }
    }

    private void bingDetailTableCell() {
        this.index.setCellValueFactory((Callback)new PropertyValueFactory(this.index.getId()));
        this.gspmId.setCellValueFactory((Callback)new PropertyValueFactory(this.gspmId.getId()));
        this.gspmName.setCellValueFactory((Callback)new PropertyValueFactory(this.gspmName.getId()));
        this.payAmount.setCellValueFactory((Callback)new PropertyValueFactory(this.payAmount.getId()));
        this.checkBox.setCellValueFactory(cellData -> ((GetPayTypeOutData)cellData.getValue()).getCheckBox().getCustomCheckBox());
        this.checkBox.setCellFactory(col -> {
            TableCell<GetPayTypeOutData, CheckBox> cell = new TableCell<GetPayTypeOutData, CheckBox>(){

                protected void updateItem(CheckBox item, boolean empty) {
                    super.updateItem(item, empty);
                    this.setDisable(true);
                    this.setGraphic((Node)item);
                }
            };
            return cell;
        });
    }

    @FXML
    public void cancelAction() {
        this.cardNo = "";
        this.jfdkAmount = "0";
        this.jfdkPoint = "0";
        this.dyqCode = "";
        this.dyqAmount = "0";
        this.dyqReason = "";
        this.czkNo = "";
        this.czkAmount = "0";
        this.dzqAmount = "0";
        this.dzqList = new ArrayList<GetDzqInData>();
        this.xjAmount = "0";
        this.ylAmount = "0";
        this.wxAmount = "0";
        this.zfbAmount = "0";
        this.ybAmount = "0";
        if (this.dyqController.code != null) {
            this.dyqController.code.setText("");
        }
        if (this.dyqController.amount != null) {
            this.dyqController.amount.setText("");
        }
        if (this.dyqController.reason != null) {
            this.dyqController.reason.setValue(new GsdcStatus("1", "\u4fc3\u9500\u62b5\u6263"));
        }
        if (this.exchangeCashController.dkAmount != null) {
            this.exchangeCashController.dkAmount.setText("");
        }
        if (this.exchangeCashController.surplusPoint != null) {
            this.exchangeCashController.surplusPoint.setText("");
        }
        if (this.czkController.czkNo != null) {
            this.czkController.czkNo.setText("");
        }
        if (this.czkController.name != null) {
            this.czkController.name.setText("");
        }
        if (this.czkController.address != null) {
            this.czkController.address.setText("");
        }
        if (this.czkController.amount != null) {
            this.czkController.amount.setText("");
        }
        if (this.czkController.balanceAmount != null) {
            this.czkController.balanceAmount.setText("");
        }
        if (this.czkController.phone != null) {
            this.czkController.phone.setText("");
        }
        if (this.czkController.sex != null) {
            this.czkController.sex.setText("");
        }
        this.anchorPane.getScene().getWindow().hide();
    }

    public TableView<GetPayTypeOutData> getTableView() {
        return this.tableView;
    }

    public TableColumn<GetPayTypeOutData, String> getIndex() {
        return this.index;
    }

    public TableColumn<GetPayTypeOutData, String> getGspmId() {
        return this.gspmId;
    }

    public TableColumn<GetPayTypeOutData, String> getGspmName() {
        return this.gspmName;
    }

    public TableColumn<GetPayTypeOutData, CheckBox> getCheckBox() {
        return this.checkBox;
    }

    public TableColumn<GetPayTypeOutData, String> getPayAmount() {
        return this.payAmount;
    }

    public ComboBox<KeyValue> getPayType() {
        return this.payType;
    }

    public TextField getSfAmount() {
        return this.sfAmount;
    }

    public TextField getYsAmount() {
        return this.ysAmount;
    }

    public TextField getDkAmount() {
        return this.dkAmount;
    }

    public TextField getSsAmount() {
        return this.ssAmount;
    }

    public TextField getDsAmount() {
        return this.dsAmount;
    }

    public Button getJfBtn() {
        return this.jfBtn;
    }

    public Button getDzqBtn() {
        return this.dzqBtn;
    }

    public TextField getZlAmount() {
        return this.zlAmount;
    }

    public Text getTotalText() {
        return this.totalText;
    }

    public Button getPayCommitBtn() {
        return this.payCommitBtn;
    }

    public AnchorPane getAnchorPane() {
        return this.anchorPane;
    }

    public TipTopController getTipTopController() {
        return this.tipTopController;
    }

    public RecipelDrugsController getRecipelDrugsController() {
        return this.recipelDrugsController;
    }

    public ExchangeCashController getExchangeCashController() {
        return this.exchangeCashController;
    }

    public MemberTipController getMemberTipController() {
        return this.memberTipController;
    }

    public DyqController getDyqController() {
        return this.dyqController;
    }

    public CzkController getCzkController() {
        return this.czkController;
    }

    public DzqController getDzqController() {
        return this.dzqController;
    }

    public ScanPayController getScanPayController() {
        return this.scanPayController;
    }

    public RecipelInfoInputController getRecipelInfoInputController() {
        return this.recipelInfoInputController;
    }

    public PrintService getPrintService() {
        return this.printService;
    }

    public SalesReceiptsMainController getSalesReceiptsMainController() {
        return this.salesReceiptsMainController;
    }

    public ObservableList<GetPayTypeOutData> getObservableTableList() {
        return this.observableTableList;
    }

    public ObservableList<KeyValue> getPayTypeOptions() {
        return this.payTypeOptions;
    }

    public String getCardNo() {
        return this.cardNo;
    }

    public String getJfdkAmount() {
        return this.jfdkAmount;
    }

    public String getJfdkPoint() {
        return this.jfdkPoint;
    }

    public String getDyqCode() {
        return this.dyqCode;
    }

    public String getDyqAmount() {
        return this.dyqAmount;
    }

    public String getDyqReason() {
        return this.dyqReason;
    }

    public String getCzkNo() {
        return this.czkNo;
    }

    public String getCzkAmount() {
        return this.czkAmount;
    }

    public String getDzqAmount() {
        return this.dzqAmount;
    }

    public String getXjAmount() {
        return this.xjAmount;
    }

    public String getYlAmount() {
        return this.ylAmount;
    }

    public String getWxAmount() {
        return this.wxAmount;
    }

    public String getZfbAmount() {
        return this.zfbAmount;
    }

    public String getYbAmount() {
        return this.ybAmount;
    }

    public List<GetDzqInData> getDzqList() {
        return this.dzqList;
    }

    public void setTableView(TableView<GetPayTypeOutData> tableView) {
        this.tableView = tableView;
    }

    public void setIndex(TableColumn<GetPayTypeOutData, String> index) {
        this.index = index;
    }

    public void setGspmId(TableColumn<GetPayTypeOutData, String> gspmId) {
        this.gspmId = gspmId;
    }

    public void setGspmName(TableColumn<GetPayTypeOutData, String> gspmName) {
        this.gspmName = gspmName;
    }

    public void setCheckBox(TableColumn<GetPayTypeOutData, CheckBox> checkBox) {
        this.checkBox = checkBox;
    }

    public void setPayAmount(TableColumn<GetPayTypeOutData, String> payAmount) {
        this.payAmount = payAmount;
    }

    public void setPayType(ComboBox<KeyValue> payType) {
        this.payType = payType;
    }

    public void setSfAmount(TextField sfAmount) {
        this.sfAmount = sfAmount;
    }

    public void setYsAmount(TextField ysAmount) {
        this.ysAmount = ysAmount;
    }

    public void setDkAmount(TextField dkAmount) {
        this.dkAmount = dkAmount;
    }

    public void setSsAmount(TextField ssAmount) {
        this.ssAmount = ssAmount;
    }

    public void setDsAmount(TextField dsAmount) {
        this.dsAmount = dsAmount;
    }

    public void setJfBtn(Button jfBtn) {
        this.jfBtn = jfBtn;
    }

    public void setDzqBtn(Button dzqBtn) {
        this.dzqBtn = dzqBtn;
    }

    public void setZlAmount(TextField zlAmount) {
        this.zlAmount = zlAmount;
    }

    public void setTotalText(Text totalText) {
        this.totalText = totalText;
    }

    public void setPayCommitBtn(Button payCommitBtn) {
        this.payCommitBtn = payCommitBtn;
    }

    public void setAnchorPane(AnchorPane anchorPane) {
        this.anchorPane = anchorPane;
    }

    public void setTipTopController(TipTopController tipTopController) {
        this.tipTopController = tipTopController;
    }

    public void setRecipelDrugsController(RecipelDrugsController recipelDrugsController) {
        this.recipelDrugsController = recipelDrugsController;
    }

    public void setExchangeCashController(ExchangeCashController exchangeCashController) {
        this.exchangeCashController = exchangeCashController;
    }

    public void setMemberTipController(MemberTipController memberTipController) {
        this.memberTipController = memberTipController;
    }

    public void setDyqController(DyqController dyqController) {
        this.dyqController = dyqController;
    }

    public void setCzkController(CzkController czkController) {
        this.czkController = czkController;
    }

    public void setDzqController(DzqController dzqController) {
        this.dzqController = dzqController;
    }

    public void setScanPayController(ScanPayController scanPayController) {
        this.scanPayController = scanPayController;
    }

    public void setRecipelInfoInputController(RecipelInfoInputController recipelInfoInputController) {
        this.recipelInfoInputController = recipelInfoInputController;
    }

    public void setPrintService(PrintService printService) {
        this.printService = printService;
    }

    public void setSalesReceiptsMainController(SalesReceiptsMainController salesReceiptsMainController) {
        this.salesReceiptsMainController = salesReceiptsMainController;
    }

    public void setObservableTableList(ObservableList<GetPayTypeOutData> observableTableList) {
        this.observableTableList = observableTableList;
    }

    public void setPayTypeOptions(ObservableList<KeyValue> payTypeOptions) {
        this.payTypeOptions = payTypeOptions;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public void setJfdkAmount(String jfdkAmount) {
        this.jfdkAmount = jfdkAmount;
    }

    public void setJfdkPoint(String jfdkPoint) {
        this.jfdkPoint = jfdkPoint;
    }

    public void setDyqCode(String dyqCode) {
        this.dyqCode = dyqCode;
    }

    public void setDyqAmount(String dyqAmount) {
        this.dyqAmount = dyqAmount;
    }

    public void setDyqReason(String dyqReason) {
        this.dyqReason = dyqReason;
    }

    public void setCzkNo(String czkNo) {
        this.czkNo = czkNo;
    }

    public void setCzkAmount(String czkAmount) {
        this.czkAmount = czkAmount;
    }

    public void setDzqAmount(String dzqAmount) {
        this.dzqAmount = dzqAmount;
    }

    public void setXjAmount(String xjAmount) {
        this.xjAmount = xjAmount;
    }

    public void setYlAmount(String ylAmount) {
        this.ylAmount = ylAmount;
    }

    public void setWxAmount(String wxAmount) {
        this.wxAmount = wxAmount;
    }

    public void setZfbAmount(String zfbAmount) {
        this.zfbAmount = zfbAmount;
    }

    public void setYbAmount(String ybAmount) {
        this.ybAmount = ybAmount;
    }

    public void setDzqList(List<GetDzqInData> dzqList) {
        this.dzqList = dzqList;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof PayController)) {
            return false;
        }
        PayController other = (PayController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        TableView<GetPayTypeOutData> this$tableView = this.getTableView();
        TableView<GetPayTypeOutData> other$tableView = other.getTableView();
        if (this$tableView == null ? other$tableView != null : !this$tableView.equals(other$tableView)) {
            return false;
        }
        TableColumn<GetPayTypeOutData, String> this$index = this.getIndex();
        TableColumn<GetPayTypeOutData, String> other$index = other.getIndex();
        if (this$index == null ? other$index != null : !this$index.equals(other$index)) {
            return false;
        }
        TableColumn<GetPayTypeOutData, String> this$gspmId = this.getGspmId();
        TableColumn<GetPayTypeOutData, String> other$gspmId = other.getGspmId();
        if (this$gspmId == null ? other$gspmId != null : !this$gspmId.equals(other$gspmId)) {
            return false;
        }
        TableColumn<GetPayTypeOutData, String> this$gspmName = this.getGspmName();
        TableColumn<GetPayTypeOutData, String> other$gspmName = other.getGspmName();
        if (this$gspmName == null ? other$gspmName != null : !this$gspmName.equals(other$gspmName)) {
            return false;
        }
        TableColumn<GetPayTypeOutData, CheckBox> this$checkBox = this.getCheckBox();
        TableColumn<GetPayTypeOutData, CheckBox> other$checkBox = other.getCheckBox();
        if (this$checkBox == null ? other$checkBox != null : !this$checkBox.equals(other$checkBox)) {
            return false;
        }
        TableColumn<GetPayTypeOutData, String> this$payAmount = this.getPayAmount();
        TableColumn<GetPayTypeOutData, String> other$payAmount = other.getPayAmount();
        if (this$payAmount == null ? other$payAmount != null : !this$payAmount.equals(other$payAmount)) {
            return false;
        }
        ComboBox<KeyValue> this$payType = this.getPayType();
        ComboBox<KeyValue> other$payType = other.getPayType();
        if (this$payType == null ? other$payType != null : !this$payType.equals(other$payType)) {
            return false;
        }
        TextField this$sfAmount = this.getSfAmount();
        TextField other$sfAmount = other.getSfAmount();
        if (this$sfAmount == null ? other$sfAmount != null : !this$sfAmount.equals(other$sfAmount)) {
            return false;
        }
        TextField this$ysAmount = this.getYsAmount();
        TextField other$ysAmount = other.getYsAmount();
        if (this$ysAmount == null ? other$ysAmount != null : !this$ysAmount.equals(other$ysAmount)) {
            return false;
        }
        TextField this$dkAmount = this.getDkAmount();
        TextField other$dkAmount = other.getDkAmount();
        if (this$dkAmount == null ? other$dkAmount != null : !this$dkAmount.equals(other$dkAmount)) {
            return false;
        }
        TextField this$ssAmount = this.getSsAmount();
        TextField other$ssAmount = other.getSsAmount();
        if (this$ssAmount == null ? other$ssAmount != null : !this$ssAmount.equals(other$ssAmount)) {
            return false;
        }
        TextField this$dsAmount = this.getDsAmount();
        TextField other$dsAmount = other.getDsAmount();
        if (this$dsAmount == null ? other$dsAmount != null : !this$dsAmount.equals(other$dsAmount)) {
            return false;
        }
        Button this$jfBtn = this.getJfBtn();
        Button other$jfBtn = other.getJfBtn();
        if (this$jfBtn == null ? other$jfBtn != null : !this$jfBtn.equals(other$jfBtn)) {
            return false;
        }
        Button this$dzqBtn = this.getDzqBtn();
        Button other$dzqBtn = other.getDzqBtn();
        if (this$dzqBtn == null ? other$dzqBtn != null : !this$dzqBtn.equals(other$dzqBtn)) {
            return false;
        }
        TextField this$zlAmount = this.getZlAmount();
        TextField other$zlAmount = other.getZlAmount();
        if (this$zlAmount == null ? other$zlAmount != null : !this$zlAmount.equals(other$zlAmount)) {
            return false;
        }
        Text this$totalText = this.getTotalText();
        Text other$totalText = other.getTotalText();
        if (this$totalText == null ? other$totalText != null : !this$totalText.equals(other$totalText)) {
            return false;
        }
        Button this$payCommitBtn = this.getPayCommitBtn();
        Button other$payCommitBtn = other.getPayCommitBtn();
        if (this$payCommitBtn == null ? other$payCommitBtn != null : !this$payCommitBtn.equals(other$payCommitBtn)) {
            return false;
        }
        AnchorPane this$anchorPane = this.getAnchorPane();
        AnchorPane other$anchorPane = other.getAnchorPane();
        if (this$anchorPane == null ? other$anchorPane != null : !this$anchorPane.equals(other$anchorPane)) {
            return false;
        }
        TipTopController this$tipTopController = this.getTipTopController();
        TipTopController other$tipTopController = other.getTipTopController();
        if (this$tipTopController == null ? other$tipTopController != null : !(this$tipTopController).equals(other$tipTopController)) {
            return false;
        }
        RecipelDrugsController this$recipelDrugsController = this.getRecipelDrugsController();
        RecipelDrugsController other$recipelDrugsController = other.getRecipelDrugsController();
        if (this$recipelDrugsController == null ? other$recipelDrugsController != null : !this$recipelDrugsController.equals(other$recipelDrugsController)) {
            return false;
        }
        ExchangeCashController this$exchangeCashController = this.getExchangeCashController();
        ExchangeCashController other$exchangeCashController = other.getExchangeCashController();
        if (this$exchangeCashController == null ? other$exchangeCashController != null : !this$exchangeCashController.equals(other$exchangeCashController)) {
            return false;
        }
        MemberTipController this$memberTipController = this.getMemberTipController();
        MemberTipController other$memberTipController = other.getMemberTipController();
        if (this$memberTipController == null ? other$memberTipController != null : !this$memberTipController.equals(other$memberTipController)) {
            return false;
        }
        DyqController this$dyqController = this.getDyqController();
        DyqController other$dyqController = other.getDyqController();
        if (this$dyqController == null ? other$dyqController != null : !this$dyqController.equals(other$dyqController)) {
            return false;
        }
        CzkController this$czkController = this.getCzkController();
        CzkController other$czkController = other.getCzkController();
        if (this$czkController == null ? other$czkController != null : !this$czkController.equals(other$czkController)) {
            return false;
        }
        DzqController this$dzqController = this.getDzqController();
        DzqController other$dzqController = other.getDzqController();
        if (this$dzqController == null ? other$dzqController != null : !this$dzqController.equals(other$dzqController)) {
            return false;
        }
        ScanPayController this$scanPayController = this.getScanPayController();
        ScanPayController other$scanPayController = other.getScanPayController();
        if (this$scanPayController == null ? other$scanPayController != null : !this$scanPayController.equals(other$scanPayController)) {
            return false;
        }
        RecipelInfoInputController this$recipelInfoInputController = this.getRecipelInfoInputController();
        RecipelInfoInputController other$recipelInfoInputController = other.getRecipelInfoInputController();
        if (this$recipelInfoInputController == null ? other$recipelInfoInputController != null : !this$recipelInfoInputController.equals(other$recipelInfoInputController)) {
            return false;
        }
        PrintService this$printService = this.getPrintService();
        PrintService other$printService = other.getPrintService();
        if (this$printService == null ? other$printService != null : !(this$printService).equals(other$printService)) {
            return false;
        }
        SalesReceiptsMainController this$salesReceiptsMainController = this.getSalesReceiptsMainController();
        SalesReceiptsMainController other$salesReceiptsMainController = other.getSalesReceiptsMainController();
        if (this$salesReceiptsMainController == null ? other$salesReceiptsMainController != null : !(this$salesReceiptsMainController).equals(other$salesReceiptsMainController)) {
            return false;
        }
        ObservableList<GetPayTypeOutData> this$observableTableList = this.getObservableTableList();
        ObservableList<GetPayTypeOutData> other$observableTableList = other.getObservableTableList();
        if (this$observableTableList == null ? other$observableTableList != null : !this$observableTableList.equals(other$observableTableList)) {
            return false;
        }
        ObservableList<KeyValue> this$payTypeOptions = this.getPayTypeOptions();
        ObservableList<KeyValue> other$payTypeOptions = other.getPayTypeOptions();
        if (this$payTypeOptions == null ? other$payTypeOptions != null : !this$payTypeOptions.equals(other$payTypeOptions)) {
            return false;
        }
        String this$cardNo = this.getCardNo();
        String other$cardNo = other.getCardNo();
        if (this$cardNo == null ? other$cardNo != null : !this$cardNo.equals(other$cardNo)) {
            return false;
        }
        String this$jfdkAmount = this.getJfdkAmount();
        String other$jfdkAmount = other.getJfdkAmount();
        if (this$jfdkAmount == null ? other$jfdkAmount != null : !this$jfdkAmount.equals(other$jfdkAmount)) {
            return false;
        }
        String this$jfdkPoint = this.getJfdkPoint();
        String other$jfdkPoint = other.getJfdkPoint();
        if (this$jfdkPoint == null ? other$jfdkPoint != null : !this$jfdkPoint.equals(other$jfdkPoint)) {
            return false;
        }
        String this$dyqCode = this.getDyqCode();
        String other$dyqCode = other.getDyqCode();
        if (this$dyqCode == null ? other$dyqCode != null : !this$dyqCode.equals(other$dyqCode)) {
            return false;
        }
        String this$dyqAmount = this.getDyqAmount();
        String other$dyqAmount = other.getDyqAmount();
        if (this$dyqAmount == null ? other$dyqAmount != null : !this$dyqAmount.equals(other$dyqAmount)) {
            return false;
        }
        String this$dyqReason = this.getDyqReason();
        String other$dyqReason = other.getDyqReason();
        if (this$dyqReason == null ? other$dyqReason != null : !this$dyqReason.equals(other$dyqReason)) {
            return false;
        }
        String this$czkNo = this.getCzkNo();
        String other$czkNo = other.getCzkNo();
        if (this$czkNo == null ? other$czkNo != null : !this$czkNo.equals(other$czkNo)) {
            return false;
        }
        String this$czkAmount = this.getCzkAmount();
        String other$czkAmount = other.getCzkAmount();
        if (this$czkAmount == null ? other$czkAmount != null : !this$czkAmount.equals(other$czkAmount)) {
            return false;
        }
        String this$dzqAmount = this.getDzqAmount();
        String other$dzqAmount = other.getDzqAmount();
        if (this$dzqAmount == null ? other$dzqAmount != null : !this$dzqAmount.equals(other$dzqAmount)) {
            return false;
        }
        String this$xjAmount = this.getXjAmount();
        String other$xjAmount = other.getXjAmount();
        if (this$xjAmount == null ? other$xjAmount != null : !this$xjAmount.equals(other$xjAmount)) {
            return false;
        }
        String this$ylAmount = this.getYlAmount();
        String other$ylAmount = other.getYlAmount();
        if (this$ylAmount == null ? other$ylAmount != null : !this$ylAmount.equals(other$ylAmount)) {
            return false;
        }
        String this$wxAmount = this.getWxAmount();
        String other$wxAmount = other.getWxAmount();
        if (this$wxAmount == null ? other$wxAmount != null : !this$wxAmount.equals(other$wxAmount)) {
            return false;
        }
        String this$zfbAmount = this.getZfbAmount();
        String other$zfbAmount = other.getZfbAmount();
        if (this$zfbAmount == null ? other$zfbAmount != null : !this$zfbAmount.equals(other$zfbAmount)) {
            return false;
        }
        String this$ybAmount = this.getYbAmount();
        String other$ybAmount = other.getYbAmount();
        if (this$ybAmount == null ? other$ybAmount != null : !this$ybAmount.equals(other$ybAmount)) {
            return false;
        }
        List<GetDzqInData> this$dzqList = this.getDzqList();
        List<GetDzqInData> other$dzqList = other.getDzqList();
        return !(this$dzqList == null ? other$dzqList != null : !(this$dzqList).equals(other$dzqList));
    }

    protected boolean canEqual(Object other) {
        return other instanceof PayController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        TableView<GetPayTypeOutData> $tableView = this.getTableView();
        result = result * 59 + ($tableView == null ? 43 : $tableView.hashCode());
        TableColumn<GetPayTypeOutData, String> $index = this.getIndex();
        result = result * 59 + ($index == null ? 43 : $index.hashCode());
        TableColumn<GetPayTypeOutData, String> $gspmId = this.getGspmId();
        result = result * 59 + ($gspmId == null ? 43 : $gspmId.hashCode());
        TableColumn<GetPayTypeOutData, String> $gspmName = this.getGspmName();
        result = result * 59 + ($gspmName == null ? 43 : $gspmName.hashCode());
        TableColumn<GetPayTypeOutData, CheckBox> $checkBox = this.getCheckBox();
        result = result * 59 + ($checkBox == null ? 43 : $checkBox.hashCode());
        TableColumn<GetPayTypeOutData, String> $payAmount = this.getPayAmount();
        result = result * 59 + ($payAmount == null ? 43 : $payAmount.hashCode());
        ComboBox<KeyValue> $payType = this.getPayType();
        result = result * 59 + ($payType == null ? 43 : $payType.hashCode());
        TextField $sfAmount = this.getSfAmount();
        result = result * 59 + ($sfAmount == null ? 43 : $sfAmount.hashCode());
        TextField $ysAmount = this.getYsAmount();
        result = result * 59 + ($ysAmount == null ? 43 : $ysAmount.hashCode());
        TextField $dkAmount = this.getDkAmount();
        result = result * 59 + ($dkAmount == null ? 43 : $dkAmount.hashCode());
        TextField $ssAmount = this.getSsAmount();
        result = result * 59 + ($ssAmount == null ? 43 : $ssAmount.hashCode());
        TextField $dsAmount = this.getDsAmount();
        result = result * 59 + ($dsAmount == null ? 43 : $dsAmount.hashCode());
        Button $jfBtn = this.getJfBtn();
        result = result * 59 + ($jfBtn == null ? 43 : $jfBtn.hashCode());
        Button $dzqBtn = this.getDzqBtn();
        result = result * 59 + ($dzqBtn == null ? 43 : $dzqBtn.hashCode());
        TextField $zlAmount = this.getZlAmount();
        result = result * 59 + ($zlAmount == null ? 43 : $zlAmount.hashCode());
        Text $totalText = this.getTotalText();
        result = result * 59 + ($totalText == null ? 43 : $totalText.hashCode());
        Button $payCommitBtn = this.getPayCommitBtn();
        result = result * 59 + ($payCommitBtn == null ? 43 : $payCommitBtn.hashCode());
        AnchorPane $anchorPane = this.getAnchorPane();
        result = result * 59 + ($anchorPane == null ? 43 : $anchorPane.hashCode());
        TipTopController $tipTopController = this.getTipTopController();
        result = result * 59 + ($tipTopController == null ? 43 : ($tipTopController).hashCode());
        RecipelDrugsController $recipelDrugsController = this.getRecipelDrugsController();
        result = result * 59 + ($recipelDrugsController == null ? 43 : $recipelDrugsController.hashCode());
        ExchangeCashController $exchangeCashController = this.getExchangeCashController();
        result = result * 59 + ($exchangeCashController == null ? 43 : $exchangeCashController.hashCode());
        MemberTipController $memberTipController = this.getMemberTipController();
        result = result * 59 + ($memberTipController == null ? 43 : $memberTipController.hashCode());
        DyqController $dyqController = this.getDyqController();
        result = result * 59 + ($dyqController == null ? 43 : $dyqController.hashCode());
        CzkController $czkController = this.getCzkController();
        result = result * 59 + ($czkController == null ? 43 : $czkController.hashCode());
        DzqController $dzqController = this.getDzqController();
        result = result * 59 + ($dzqController == null ? 43 : $dzqController.hashCode());
        ScanPayController $scanPayController = this.getScanPayController();
        result = result * 59 + ($scanPayController == null ? 43 : $scanPayController.hashCode());
        RecipelInfoInputController $recipelInfoInputController = this.getRecipelInfoInputController();
        result = result * 59 + ($recipelInfoInputController == null ? 43 : $recipelInfoInputController.hashCode());
        PrintService $printService = this.getPrintService();
        result = result * 59 + ($printService == null ? 43 : ($printService).hashCode());
        SalesReceiptsMainController $salesReceiptsMainController = this.getSalesReceiptsMainController();
        result = result * 59 + ($salesReceiptsMainController == null ? 43 : ($salesReceiptsMainController).hashCode());
        ObservableList<GetPayTypeOutData> $observableTableList = this.getObservableTableList();
        result = result * 59 + ($observableTableList == null ? 43 : $observableTableList.hashCode());
        ObservableList<KeyValue> $payTypeOptions = this.getPayTypeOptions();
        result = result * 59 + ($payTypeOptions == null ? 43 : $payTypeOptions.hashCode());
        String $cardNo = this.getCardNo();
        result = result * 59 + ($cardNo == null ? 43 : $cardNo.hashCode());
        String $jfdkAmount = this.getJfdkAmount();
        result = result * 59 + ($jfdkAmount == null ? 43 : $jfdkAmount.hashCode());
        String $jfdkPoint = this.getJfdkPoint();
        result = result * 59 + ($jfdkPoint == null ? 43 : $jfdkPoint.hashCode());
        String $dyqCode = this.getDyqCode();
        result = result * 59 + ($dyqCode == null ? 43 : $dyqCode.hashCode());
        String $dyqAmount = this.getDyqAmount();
        result = result * 59 + ($dyqAmount == null ? 43 : $dyqAmount.hashCode());
        String $dyqReason = this.getDyqReason();
        result = result * 59 + ($dyqReason == null ? 43 : $dyqReason.hashCode());
        String $czkNo = this.getCzkNo();
        result = result * 59 + ($czkNo == null ? 43 : $czkNo.hashCode());
        String $czkAmount = this.getCzkAmount();
        result = result * 59 + ($czkAmount == null ? 43 : $czkAmount.hashCode());
        String $dzqAmount = this.getDzqAmount();
        result = result * 59 + ($dzqAmount == null ? 43 : $dzqAmount.hashCode());
        String $xjAmount = this.getXjAmount();
        result = result * 59 + ($xjAmount == null ? 43 : $xjAmount.hashCode());
        String $ylAmount = this.getYlAmount();
        result = result * 59 + ($ylAmount == null ? 43 : $ylAmount.hashCode());
        String $wxAmount = this.getWxAmount();
        result = result * 59 + ($wxAmount == null ? 43 : $wxAmount.hashCode());
        String $zfbAmount = this.getZfbAmount();
        result = result * 59 + ($zfbAmount == null ? 43 : $zfbAmount.hashCode());
        String $ybAmount = this.getYbAmount();
        result = result * 59 + ($ybAmount == null ? 43 : $ybAmount.hashCode());
        List<GetDzqInData> $dzqList = this.getDzqList();
        result = result * 59 + ($dzqList == null ? 43 : ($dzqList).hashCode());
        return result;
    }

    public String toString() {
        return "PayController(tableView=" + this.getTableView() + ", index=" + this.getIndex() + ", gspmId=" + this.getGspmId() + ", gspmName=" + this.getGspmName() + ", checkBox=" + this.getCheckBox() + ", payAmount=" + this.getPayAmount() + ", payType=" + this.getPayType() + ", sfAmount=" + this.getSfAmount() + ", ysAmount=" + this.getYsAmount() + ", dkAmount=" + this.getDkAmount() + ", ssAmount=" + this.getSsAmount() + ", dsAmount=" + this.getDsAmount() + ", jfBtn=" + this.getJfBtn() + ", dzqBtn=" + this.getDzqBtn() + ", zlAmount=" + this.getZlAmount() + ", totalText=" + this.getTotalText() + ", payCommitBtn=" + this.getPayCommitBtn() + ", anchorPane=" + this.getAnchorPane() + ", tipTopController=" + this.getTipTopController() + ", recipelDrugsController=" + this.getRecipelDrugsController() + ", exchangeCashController=" + this.getExchangeCashController() + ", memberTipController=" + this.getMemberTipController() + ", dyqController=" + this.getDyqController() + ", czkController=" + this.getCzkController() + ", dzqController=" + this.getDzqController() + ", scanPayController=" + this.getScanPayController() + ", recipelInfoInputController=" + this.getRecipelInfoInputController() + ", printService=" + this.getPrintService() + ", salesReceiptsMainController=" + this.getSalesReceiptsMainController() + ", observableTableList=" + this.getObservableTableList() + ", payTypeOptions=" + this.getPayTypeOptions() + ", cardNo=" + this.getCardNo() + ", jfdkAmount=" + this.getJfdkAmount() + ", jfdkPoint=" + this.getJfdkPoint() + ", dyqCode=" + this.getDyqCode() + ", dyqAmount=" + this.getDyqAmount() + ", dyqReason=" + this.getDyqReason() + ", czkNo=" + this.getCzkNo() + ", czkAmount=" + this.getCzkAmount() + ", dzqAmount=" + this.getDzqAmount() + ", xjAmount=" + this.getXjAmount() + ", ylAmount=" + this.getYlAmount() + ", wxAmount=" + this.getWxAmount() + ", zfbAmount=" + this.getZfbAmount() + ", ybAmount=" + this.getYbAmount() + ", dzqList=" + this.getDzqList() + ")";
    }
}

